class Solution:
    def maxFreqSum(self, s: str) -> int:
        # 统计各个字母数量
        dic = defaultdict(int)
        for i in range(len(s)):
            dic[s[i]] += 1

        # 找到最多的元音和辅音的字母
        max_yuan = max_fu = 0
        for x in dic:
            if x in "aeiou":
                max_yuan = max(max_yuan, dic[x])
            else:
                max_fu = max(max_fu, dic[x])
        return max_yuan + max_fu